package com.mshine.cloud.controller;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.mshine.cloud.service.TestAService;
import com.mshine.cloud.service.TestBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    TestAService testAService;
    @Autowired
    TestBService testBService;

    @LcnTransaction //lcn的事务注解
    @RequestMapping("/test")
    public String test() {
        System.out.println(testAService.test());
        System.out.println(testBService.test());
        return "成功";
    }
}
